Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: use event syntax for particlesLoaded #31

Merged
merged 9 commits into from
Aug 21, 2023
Merged

fix: use event syntax for particlesLoaded #31

merged 9 commits into from
Aug 21, 2023

Conversation

Joepocalyptic
Copy link
Contributor

Fixes #30.

Also cleaned up the two examples to remove dead code and use Nuxt best practices.

apps/nuxt3/.npmrc Show resolved Hide resolved
apps/nuxt3/nuxt.config.ts Show resolved Hide resolved
apps/nuxt3/app.vue Outdated Show resolved Hide resolved
apps/nuxt3/app.vue Outdated Show resolved Hide resolved
apps/nuxt3/app.vue Outdated Show resolved Hide resolved
apps/nuxt3/app.vue Outdated Show resolved Hide resolved
apps/vue3/src/App.vue Outdated Show resolved Hide resolved
apps/nuxt3/app.vue Outdated Show resolved Hide resolved
apps/nuxt3/nuxt.config.ts Show resolved Hide resolved
@Joepocalyptic
Copy link
Contributor Author

Should be all set now. Sorry for the trouble; this is pretty much my first time contributing to an external project. 😅

@matteobruni
Copy link
Contributor

Don't worry, these are mainly questions to understand what has been done, the changes were minor fixes, nothing to worry about since the project was building and running

@matteobruni matteobruni changed the base branch from main to dev August 21, 2023 07:33
@matteobruni
Copy link
Contributor

I've changed the base branch, since this contains a breaking change and can't be released as a minor version. I have other plans for the major release as I said in the linked issue and this will be released there too.

@matteobruni matteobruni merged commit 8e7ed34 into tsparticles:dev Aug 21, 2023
3 checks passed
@Joepocalyptic
Copy link
Contributor Author

Perfect, thank you!

@Joepocalyptic
Copy link
Contributor Author

On the topic of the next major release, maybe it could be implemented with Vue Demi as opposed to having two separate repositories for Vue 2 and 3? That'd be much easier to maintain if you don't plan on dropping the Vue 2 release once it goes EOL.

@matteobruni
Copy link
Contributor

Didn't know about this project, this is very interesting and could be good for the next major release. Instead of having @tsparticles/vue2 @tsparticles/vue3 packages, only @tsparticles/vue package could exist.

@Joepocalyptic
Copy link
Contributor Author

I managed to write a proof-of-concept with this PR as a base using vue-demi (I've been meaning to experiment with it regardless): https://github.com/Joepocalyptic/vue-particles/tree/main/packages/vue-particles

Apparently vue-demi works by adjusting which functions to use based on the user's environment; what this means is that you actually can't precompile the SFC since it needs to go straight through the user's build pipeline (e.g. Vite).

I replaced the Vite bundler with unjs/unbuild configured to simply copy the Vue SFC in-place. This is actually how most Vue component libraries work nowadays, regardless.

@matteobruni
Copy link
Contributor

Really nice, if you want to submit a PR targeting the dev branch, you're welcome to do it, and thanks for the suggestion anyway.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Feature request: allow hoisting tsparticles-engine's init() function
2 participants